<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>宅音乐后台管理 - 登录</title>
    <meta name="keywords" content="HTML浮窗音乐播放器"/>
    <meta name="description" content="HTML浮窗音乐播放器"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript" src="/static/js/jquery-3.1.1.min.js"></script>
    <link href="/static/css/custom/login2.css" rel="stylesheet" type="text/css"/>

    <style>
        .vp-dark-btn.vp-basic-btn .vp-about{
            display: none !important;
        }
    </style>
</head>
<body>
<h1>宅音乐后台管理<sup>V1.1</sup></h1>

<div class="login" style="margin-top:50px;">
    <div class="header">
        <div class="switch" id="switch"><a class="switch_btn_focus" id="switch_qlogin" href="javascript:void(0);"
                                           tabindex="7">快速登录</a>
            <a class="switch_btn" id="switch_login" href="javascript:void(0);" tabindex="8">快速注册</a>
            <div class="switch_bottom" id="switch_bottom" style="position: absolute; width: 64px; left: 0px;"></div>
        </div>
    </div>
    <div class="web_qr_login" id="web_qr_login">
        <!--登录-->
        <div class="web_login" id="web_login">
            <div class="login-box">
                <div class="login_form">
                    <form action="/admin/user/login" name="loginform" accept-charset="utf-8" id="login_form"
                          class="loginForm" method="post">
                        <div class="uinArea" id="uinArea">
                            <label class="input-tips" for="u">帐号：</label>
                            <div class="inputOuter" id="uArea">
                                <input type="text" id="u" name="username" class="inputstyle"/>
                            </div>
                        </div>
                        <div class="pwdArea" id="pwdArea">
                            <label class="input-tips" for="p">密码：</label>
                            <div class="inputOuter" id="pArea">
                                <input type="password" id="p" name="password" class="inputstyle"/>
                            </div>
                        </div>
                        <div>
                            <input type="button" id="loginbutton" value="登 录"  class="button_blue"/>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <!--登录end-->
    </div>

    <!--注册-->
    <div class="qlogin" id="qlogin" style="display: none; ">
        <div class="web_login">
            <form name="form2" id="regUser" accept-charset="utf-8" action="/admin/user/register" method="post">
                <ul class="reg_form" id="reg-ul">
                    <div id="userCue" class="cue">快速注册请注意格式</div>
                    <li>
                        <label for="user" class="input-tips2">用户名：</label>
                        <div class="inputOuter2">
                            <input type="text" id="user" name="username" maxlength="16" class="inputstyle2"/>
                        </div>
                    </li>
                    <li>
                        <label for="passwd" class="input-tips2">密码：</label>
                        <div class="inputOuter2">
                            <input type="password" id="passwd" name="password" maxlength="16" class="inputstyle2"/>
                        </div>
                    </li>
                    <li>
                        <label for="passwd2" class="input-tips2">确认密码：</label>
                        <div class="inputOuter2">
                            <input type="password" id="passwd2" maxlength="16" class="inputstyle2"/>
                        </div>
                    </li>
                    <li>
                        <label for="qq" class="input-tips2">QQ：</label>
                        <div class="inputOuter2">
                            <input type="text" id="qq" name="qq" maxlength="10" class="inputstyle2"/>
                        </div>
                    </li>
                    <li>
                        <div class="inputArea">
                            <input type="button" id="reg" class="button_blue"
                                   value="注册"/>
                        </div>
                    </li>
                    <div class="cl"></div>
                </ul>
            </form>
        </div>
    </div>
    <!--注册end-->
</div>
<div class="jianyi">*推荐使用ie8或以上版本ie浏览器或Chrome内核浏览器访问本站</div>
<script type="application/javascript" src="\static\plugins\layer-v3.0.1\layer\layer.js"></script>
<script>
    $('#loginbutton').click(function () {
        if($("#u").val() === '' || $("#p").val() === ''){
            layer.msg("请填写完整！");
            return;
        }
        $.post($('#login_form').attr('action'), $('#login_form').serialize(), function (data) {
            if (data.code === 1) {
                layer.msg(data.msg);
                setTimeout(function(){
                    location.href = "/admin/";
                },500);
            } else {
                layer.msg(data.msg);
            }
        });
    });
</script>
<script type="text/javascript" src="/static/js/custom/login.js"></script>
</body>
</html>